package com.atguigu.springcloud.controller;

import com.atguigu.springcloud.service.CircuitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * hystrix熔断
 * @author timiv
 */
@RestController
public class CircuitController {

    @Autowired
    private CircuitService circuitService;


    @GetMapping("/payment/circuit/{id}")
    public String payment_circuit(@PathVariable("id")Integer id){
        return circuitService.payment_circuit(id);
    }
}
